package com.itheima.test;

import com.itheima.dao.StudentDao;
import com.itheima.domian.Student;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.*;
import java.util.ArrayList;

public class test {
    //private static final Logger LOGGER = LoggerFactory.getLogger(StudentDao.class);

    public static void main(String[] args) {
        try {
            ArrayList<Student> studentList = new ArrayList<>();
            //ObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File("Student_Server\\Student.txt")));
            ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File("Student_Server\\Student.txt")));
            //studentList = (ArrayList<Student>) ois.readObject();
            studentList.add(new Student(0,"张三","男",23));
            studentList.add(new Student(2,"李四","女",14));
            studentList.add(new Student(1,"李sf","女",13));
            oos.writeObject(studentList);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
